package com.mooc.yohoshop.ui.verifycode;

import com.mooc.yohoshop.ApiService;
import com.mooc.yohoshop.entity.BaseEntity;
import com.mooc.yohoshop.entity.VerifyCodeEntity;
import com.mooc.yohoshop.network.BaseRepository;
import com.mooc.yohoshop.network.HttpFactory;
import com.mooc.yohoshop.network.HttpType;

import java.util.HashMap;

import io.reactivex.Observable;

public class VerifyCodeRepo extends BaseRepository {

    Observable<BaseEntity> requestVerifyCode(HashMap<String,Object>map){
        return convertObservable(HttpFactory.factory(HttpType.UPLOADTYPE)
                .getRetrofit().create(ApiService.class)
                .requestVerifyCode(createBody(map)));
    }

    Observable<BaseEntity> requestVerifyCodeLogin(HashMap<String,Object>map){
        return convertObservable(HttpFactory.factory(HttpType.UPLOADTYPE)
                .getRetrofit().create(ApiService.class)
                .requestVerifyCodeLogin(createBody(map)));
    }

}
